package com.yxw.yxnet_cd_center.customer_service.dto;



import com.yxw.yxnet_cd_center.customer_service.entity.FlowRuleUserEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
//import lombok.EqualsAndHashCode;



@Data
//@EqualsAndHashCode(callSuper = true)
public class FlowRuleUserDTO   implements Serializable
{
    private static final long serialVersionUID = 81697359434228L;
    /**
    *状态 0:启用 1：禁用
    */
    @ApiModelProperty(value = "状态 0:启用 1：禁用")
    private Integer ruleStatus;
    /**
    *渠道编码
    */
    @ApiModelProperty(value = "渠道编码")
    private String channelCode;
    /**
    *端口编码
    */
    @ApiModelProperty(value = "端口编码")
    private String portCode;
    /**
    *服务类型编号
    */
    @ApiModelProperty(value = "服务类型编号")
    private String serviceTypeCode;
    /**
    *规则编码
    */
    @ApiModelProperty(value = "规则编码")
    private String ruleTypeCode;
    /**
    *客服ID
    */
    @ApiModelProperty(value = "客服ID")
    private Long userId;
    /**
    *用户真实姓名
    */
    @NotBlank(message = "用户真实姓名不可为空")
    @ApiModelProperty(value = "用户真实姓名")
    private String userName;
    /**
    *手机号
    */
    @ApiModelProperty(value = "手机号")
    private String mobilePhone;
    /**
    *登录状态：0-未登录 1-已登录
    */
    @ApiModelProperty(value = "登录状态：0-未登录 1-已登录")
    private Integer loginStatus;
    /**
    *将DTO转换为ENTITY
    */
    public FlowRuleUserEntity ConverToEntity()
    {
        FlowRuleUserEntity oFlowRuleUserEntity = new FlowRuleUserEntity ();
        oFlowRuleUserEntity.setRuleStatus(ruleStatus) ;
        oFlowRuleUserEntity.setChannelCode(channelCode) ;
        oFlowRuleUserEntity.setPortCode(portCode) ;
        oFlowRuleUserEntity.setServiceTypeCode(serviceTypeCode) ;
        oFlowRuleUserEntity.setRuleTypeCode(ruleTypeCode) ;
        oFlowRuleUserEntity.setUserId(userId) ;
        oFlowRuleUserEntity.setUserName(userName) ;
        oFlowRuleUserEntity.setMobilePhone(mobilePhone) ;
        oFlowRuleUserEntity.setLoginStatus(loginStatus) ;
        return oFlowRuleUserEntity;
    }
}

